const routes = [
  {
    path: '/',
    component: () => import('@/layout/index.vue'),
    redirect: '/home/loading',
    children: [
      {
        path: "/home/loading",
        component: () => import('../views/home/index.vue'),
        meta: {
          title: "首页",
          keepAlive: true
        },
        children: [
          {
            path: '/home/loading',
            component: () => import('@/views/home/pages/loading.vue'),
            meta: { title: '活动', keepAlive: true, active: 0 }
          },
          {
            path: '/home/task',
            component: () => import('@/views/home/pages/task.vue'),
            meta: { title: '任务', keepAlive: true, active: 1 }
          },
          {
            path: '/home/box',
            component: () => import('@/views/home/pages/box.vue'),
            meta: { title: '任务', keepAlive: true, active: 2 }
          }
        ]
      },
      {
        path: "/user",
        name: "user",
        component: () => import('../views/user/index.vue'),
        meta: {
          title: "我的",
          keepAlive: true
        }
      }
    ]
  },

  {
    path: '/:catchAll(.*)',
    name: 'not-found',
    component: () => import('../layout/404.vue'),
    meta: {
      title: "访问页面不存在",
      keepAlive: true
    }
  },
]
export default routes;
